<?php
/**
 * Created by Forever.
 * User: Forever
 * Date: 2018/8/27 0027
 * Time: 上午 9:53
 */
namespace app\login\validate;
use think\Validate;
use think\Db;
class Api extends Validate{
    // 验证规则
    protected $rule = [
        ['code','require','-10003'],
        ['encryptData','require','-10004'],
        ['iv','require','-10005'],
        ['signature','require','-10006'],
        ['growth_list','require|checkGrowth:growth_list','-10750'],

    ];

    /*验证的名字*/
    protected $scene = [
        'code'=>['code'],
        'user'=>['code','encryptData','iv','signature'],
    ];


    /**检查成长值
     * [checkData description]
     * @param  [type] $value [description]
     * @param  [type] $rule  [description]
     * @param  [type] $data  [description]
     * @return [type]        [description]
     */
    protected function checkGrowth($value,$rule,$data){
        return true;
    }


}